<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改参数')" />
	<th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-param-edit" th:object="${params}">
		<input id="paramterUUID" name="paramterUUID" type="hidden" th:value="*{paramterUUID}">
        <input id="paramterId" name="paramterId" type="hidden" th:value="*{paramterId}">
        <input id="paramterLlId" name="paramterLlId" type="hidden" th:value="*{paramterLlId}">
        <input id="paramterLl2Id" name="paramterLl2Id" type="hidden" th:value="*{paramterLl2Id}">
        <input id="cratetime" name="cratetime" type="hidden" th:value="*{cratetime}">
		<h4 class="form-header h4">参数信息</h4>
		<div class="nput-group col-sm-12 row"  id="csList">
			<div  class="col-sm-12 row">
				<label class="col-sm-2 control-label  is-required">参数类型：</label>
				<div class="col-sm-3">
					<input class="form-control" type="text" id="paramterName" name="paramterName" th:value="*{paramterName}"  required>
				</div>
			</div>
			<div  class="col-sm-12 row">
				<label class="col-sm-2 control-label">参数小类：</label>
				<div class="col-sm-3">
					<input class="form-control" type="text" id="paramterLlName" name="paramterLlName" th:value="*{paramterLlName}">
				</div>
				<div class="col-sm-3">
					<input class="form-control" type="text" id="paramterLl2Name" name="paramterLl2Name" th:value="*{paramterLl2Name}">
				</div>
				<label class="col-sm-2 control-label  is-required">参数值：</label>
				<div class="col-sm-2">
					<input type="number" placeholder="请输入结果" class="form-control" id="paramterValue" name="paramterValue" th:value="*{paramterValue}">
				</div>
			</div>
			<div  class="col-sm-12 row">
				<label class="col-sm-2 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="bak" name="bak" class="form-control" th:value="*{bak}"></textarea>
				</div>
			</div>
		</div>
	</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<th:block th:include="include :: jquery-cxselect-js" />
<script type="text/javascript">
    $("#form-param-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            edit();
        }
    }
    function edit(){
        var paramterUUID = $("#paramterUUID").val();
        var paramterIds=$("#paramterId").val();
        var paramterIdsName=$("#paramterName").val();
        var paramLlIds=$("#paramterLlId").val();
        var paramLlIdsName=$("#paramterLlName").val();
        var paramLl2Ids=$("#paramterLl2Id").val();
        var paramLl2IdsName=$("#paramterLl2Name").val();
        var paramterValues = $("#paramterValue").val();
        var cratetime = $("#cratetime").val();
        var baks = $("#bak").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx+"sujian/parameterManagement/edit",
            data : {
                "paramterUUID":paramterUUID,
                "paramterValue": paramterValues,
                "bak": baks,
                "paramterId": paramterIds,
                "paramterName": paramterIdsName,
                "paramLlId": paramLlIds,
                "paramterLlName": paramLlIdsName,
                "paramLl2Id": paramLl2Ids,
                "paramterLl2Name": paramLl2IdsName,
                "cratetime":cratetime
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
